Skip to content

Conversation

@joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Nov 8, 2024

Problem solved

Fixes CNCT-2287


PR-Codex overview

This PR focuses on improving gas cost estimations and enhancing token balance formatting in the thirdweb package. It updates the way gas fees are calculated and modifies the display of token balances in various components.

Detailed summary

  • Updated gas cost estimation to use maxFeePerGas.
  • Increased decimal precision for displayed token balances in:
    • Details.tsx (from 5 to 9 decimals)
    • WalletSelectorButton.tsx (default precision)
    • PayWithCrypto.tsx (default precision)
    • TransactionModeScreen.tsx (default precision)
  • Modified inline snapshots in tests for gas cost estimates.
  • Changed gas price retrieval to use getDefaultGasOverrides.
  • Updated the NFT contract address and chain in transaction-button.tsx.
  • Adjusted the token ID from 0n to 1n in PayTransactionPreview.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@changeset-bot
Copy link

changeset-bot bot commented Nov 8, 2024

🦋 Changeset detected

Latest commit: 339e62d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
thirdweb Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Nov 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 8, 2024 1:21am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 8, 2024 1:21am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 8, 2024 1:21am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 8, 2024 1:21am

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 8, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@github-actions github-actions bot added Playground Changes involving the Playground codebase. packages labels Nov 8, 2024
Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @joaquim-verges and the rest of your teammates on Graphite Graphite

@linear
Copy link

linear bot commented Nov 8, 2024

@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 43.1 KB (+0.1% 🔺) 863 ms (+0.1% 🔺) 408 ms (+23.43% 🔺) 1.3 s
thirdweb (cjs) 103.02 KB (-0.1% 🔽) 2.1 s (-0.1% 🔽) 686 ms (-19.26% 🔽) 2.8 s
thirdweb (minimal + tree-shaking) 4.85 KB (-0.35% 🔽) 97 ms (-0.35% 🔽) 48 ms (+40.1% 🔺) 145 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 64 ms (+145.55% 🔺) 74 ms
thirdweb/react (minimal + tree-shaking) 17.56 KB (+0.06% 🔺) 352 ms (+0.06% 🔺) 232 ms (+471.71% 🔺) 583 ms

@codecov
Copy link

codecov bot commented Nov 8, 2024

Codecov Report

Attention: Patch coverage is 28.57143% with 10 lines in your changes missing coverage. Please review.

Project coverage is 45.72%. Comparing base (03ce881) to head (1458402).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...rdweb/src/transaction/actions/estimate-gas-cost.ts 40.00% 6 Missing ⚠️
...hirdweb/src/react/web/ui/ConnectWallet/Details.tsx 0.00% 1 Missing ⚠️
...onnectWallet/screens/Buy/TransactionModeScreen.tsx 0.00% 1 Missing ⚠️
...ConnectWallet/screens/Buy/WalletSelectorButton.tsx 0.00% 1 Missing ⚠️
...i/ConnectWallet/screens/Buy/swap/PayWithCrypto.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5349      +/-   ##
==========================================
- Coverage   45.76%   45.72%   -0.04%     
==========================================
  Files        1069     1069              
  Lines       55606    55612       +6     
  Branches     4074     4077       +3     
==========================================
- Hits        25446    25428      -18     
- Misses      29471    29495      +24     
  Partials      689      689              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 03ce881
packages 40.86% <28.57%> (-0.05%) ⬇️

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
...hirdweb/src/react/web/ui/ConnectWallet/Details.tsx 1.09% <0.00%> (ø)
...onnectWallet/screens/Buy/TransactionModeScreen.tsx 0.88% <0.00%> (ø)
...ConnectWallet/screens/Buy/WalletSelectorButton.tsx 2.83% <0.00%> (ø)
...i/ConnectWallet/screens/Buy/swap/PayWithCrypto.tsx 2.43% <0.00%> (ø)
...rdweb/src/transaction/actions/estimate-gas-cost.ts 82.35% <40.00%> (-17.65%) ⬇️

... and 2 files with indirect coverage changes

@joaquim-verges joaquim-verges merged commit 46d0b4b into main Nov 8, 2024
31 of 32 checks passed
@joaquim-verges joaquim-verges deleted the fix_use_maxFeePerGas_for_Pay_gas_estimations branch November 8, 2024 01:26
@jnsdls jnsdls mentioned this pull request Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages Playground Changes involving the Playground codebase.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants